package com.jz.community.moduleshopping.shopCart.ui;

import android.os.Bundle;
import android.support.v4.view.ViewPager;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.jz.community.basecomm.base.BaseMvpActivity;
import com.jz.community.basecomm.mvp.BaseMvpPresenter;
import com.jz.community.basecomm.routerUtils.RouterIntentConstant;
import com.jz.community.moduleshopping.R;
import com.jz.community.moduleshopping.R2;
import com.jz.community.moduleshopping.orderList.adapter.CommonViewPagerAdapter;

import butterknife.BindView;

@Route(path = RouterIntentConstant.MODULE_SHOPPING_SHOP_CART)
public class ShopCartActivity extends BaseMvpActivity {
    @BindView(R2.id.cart_viewpager)
    ViewPager cartViewpager;
    private ShoppingCartFragment shoppingCartFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected int getContentView() {
        return R.layout.module_shopping_activity_cart;
    }

    @Override
    protected BaseMvpPresenter createPresenter() {
        return null;
    }

    @Override
    protected void initDatas() {
        initViewPager();
    }

    private void initViewPager() {
        CommonViewPagerAdapter viewPagerAdapter = new CommonViewPagerAdapter(getSupportFragmentManager());
        shoppingCartFragment = new ShoppingCartFragment();
        viewPagerAdapter.addFragment(shoppingCartFragment);
        cartViewpager.setAdapter(viewPagerAdapter);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
